﻿@using KMF.WebUI.Areas.KMFadmin.CustomHelpers
@model KMF.Common.BannerImageDto
<div id="edit-banner-image">
    @using (Html.BeginForm("AjaxEditBannerImage", "AdminBanner", FormMethod.Post, new
{
    enctype = "multipart/form-data",
    id = "EditImgForm",
    name = "EditImgForm",
    target = "EditUploadTarget"
}))
    {
        @Html.HiddenFor(m => m.BannerImageId)
        @Html.HiddenFor(m => m.CreateDate)
        @Html.HiddenFor(m => m.ImagePath)
        @Html.HiddenFor(m => m.BannerId)
        <table class="table-info">
            <tr>
                <td class="tInfoLeft">Upload ảnh
                </td>
                <td class="tInfoRight">
                    <input type="file" name="imageFile" />
                </td>
            </tr>
            <tr>
                <td class="tInfoLeft">Tựa đề
                </td>
                <td class="tInfoRight">
                    @Html.TextBoxFor(m => m.Title, new { @class = "pimDescription" })
                </td>
            </tr>
            <tr>
                <td class="tInfoLeft">Mô tả ngắn
                </td>
                <td class="tInfoRight">
                    @Html.TextBoxFor(m => m.Description, new { @class = "pimDescription" })
                </td>
            </tr>
            <tr>
                <td class="tInfoLeft">Url
                </td>
                <td class="tInfoRight">
                    @Html.TextBoxFor(m => m.Url)
                </td>
            </tr>
            <tr>
                <td class="tInfoLeft">Url Google Analytic
                </td>
                <td class="tInfoRight">
                    @Html.TextBoxFor(m => m.UrlStatistic)
                </td>
            </tr>
            <tr>
                <td class="tInfoLeft">Thứ tự</td>
                <td class="tInfoRight">
                    @Html.TextBoxFor(m => m.Order, new { @class = "pimOrdering" })
                    @Html.ValidationMessageFor(m => m.Order)
                </td>
            </tr>
            <tr>
                <td class="tInfoLeft">Hiển thị</td>
                <td class="tInfoRight">
                    @Html.CheckBoxFor(m => m.Show, new { @class = "pimActive" })
                </td>
            </tr>
            <tr>
                <td class="tInfoLeft">Độ rộng</td>
                <td class="tInfoRight">
                    @Html.TextBoxFor(m => m.Width)
                    @Html.ValidationMessageFor(m => m.Width)
                </td>
            </tr>
            <tr>
                <td class="tInfoLeft">Độ cao</td>
                <td class="tInfoRight">
                    @Html.TextBoxFor(m => m.Height)
                    @Html.ValidationMessageFor(m => m.Height)
                </td>
            </tr>
            <tr>
                <td class="tInfoLeft"></td>
                <td class="tInfoRight">
                    <input type="button" value="Cập nhật ảnh" onclick="EditImage()" id="btnSaveImage" />
                    <input type="button" value="Hủy" onclick="RemoveEditBannerImage()"/>
                </td>
            </tr>
        </table>
    }
    <iframe id="EditUploadTarget" name="EditUploadTarget" onload="EditBannerImage_Complete();" style="position: absolute; left: -999em; top: -999em;"></iframe>
</div>
